﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UI/HRManagerUI/HrManager.Master"
    AutoEventWireup="true" CodeBehind="AddStatus.aspx.cs" Inherits="HRM.UI.HRManagerUI.Configuration.AddStatus" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContentBody" runat="server">
    <link href="../../../Styles/Configuration/AddEmployeeCss.css" rel="stylesheet" type="text/css" />
    <link href="../../../Styles/Configuration/AddStatusCss.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" language="javascript">

        function CheckField() {
            if (document.getElementById("<%=txtAddempStatus.ClientID%>").value == "") {
                document.getElementById("<%=msgLabel.ClientID%>").textContent = "Please Enter Employee Status!";
                document.getElementById("<%=msgLabel.ClientID%>").style.color = "red";
                document.getElementById("<%=txtAddempStatus.ClientID%>").focus();
                return false;
            }
            return true;
        }       

    </script>
    <fieldset>
        <legend>Add New Status</legend>
        <table class="AddStatusTB">
            <tr>
                <td colspan="2" class="msgLabeltd">
                    <p class="msgTxt">
                        <asp:Label runat="server" ID="msgLabel"></asp:Label></p>
                </td>
            </tr>
            <tr>
                <td class="Label">
                    Status Name
                </td>
                <td class="Field">
                    <input type="text" runat="server" id="txtAddempStatus" class="textboxinput" /><span class="estaricStar">*</span>
                </td>
            </tr>
            <tr>
                <td class="Label">
                </td>
                <td class="Field">
                    <input type="submit" onserverclick="SaveStatus" runat="server" id="addEmpStatus"
                        value="Add Status" class="btnCss" onclick="return CheckField()" />
                </td>
            </tr>
        </table>
    </fieldset>
    <fieldset>
        <legend>Status List</legend>
        <div align="center">
        <asp:GridView runat="server" ID="EmpStatusGridview" CssClass="GridviewStyle"
            AutoGenerateColumns="False" OnPageIndexChanging="EmpStatusGridview_PageIndexChanging"
            OnRowCancelingEdit="EmpStatusGridview_RowCancelingEdit" OnRowDeleting="EmpStatusGridview_RowDeleting"
            OnRowEditing="EmpStatusGridview_RowEditing" OnRowUpdating="EmpStatusGridview_RowUpdating"
             BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px"
            CellPadding="3" AllowPaging="True" PageSize="5" Width="60%">
            <AlternatingRowStyle />
            <Columns>
                <asp:TemplateField Visible="False">
                    <ItemTemplate>
                        <asp:Label ID="lblStatusId" runat="server" Text='<%# Bind("Id") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Employee Status">
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("EmpStatus") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtEmpStatusEdit" runat="server" Text='<%# Bind("EmpStatus") %>'></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:CommandField HeaderText="Edit" ShowEditButton="True" />
                <asp:CommandField HeaderText="Delete" ShowDeleteButton="True" />
            </Columns>
            <FooterStyle CssClass="GridViewFooterStyle"/>
            <HeaderStyle  CssClass="GridViewHeaderStyle"/>
            <PagerStyle CssClass="GridViewFooterStyle"/>
           
            <RowStyle ForeColor="#000066" />
            <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F1F1F1" />
            <SortedAscendingHeaderStyle BackColor="#007DBB" />
            <SortedDescendingCellStyle BackColor="#CAC9C9" />
            <SortedDescendingHeaderStyle BackColor="#00547E" />
           
        </asp:GridView>
        </div>
    </fieldset>
</asp:Content>
